package com.immunology.service;

import java.sql.SQLException;
import java.util.List;

import com.immunology.dao.PatientDao;
import com.immunology.database.transformers.PatientTransformer;
import com.immunology.model.Patient;

public class PatientService {
	private PatientDao patientDao = new PatientDao(new PatientTransformer());

	/*
	 * public User getUserById(int userId) { return patientDao.getById(userId);
	 * }
	 * 
	 * public boolean changeUserRole(int id, String role){ return
	 * patientDao.changeRole(id, role); }
	 * 
	 * public boolean deleteUserById(int id){ return patientDao.delete(id); }
	 * 
	 * public List<User> getAllUsers(){ return patientDao.getAll(); }
	 */
	public List<Patient> searchPatient(String query) throws SQLException {
		return patientDao.search(query);
	}

	public Patient searchPatientById(int id) throws SQLException {
		return patientDao.getById(id);
	}
}
